﻿@model Model.EF.User

@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Admin/Views/Shared/_Layouts.cshtml";
}
@section header{
    Cập nhật người dùng
}
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                Nhập thông tin người dùng.
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6">
                        @using (Html.BeginForm("Edit", "User", FormMethod.Post))
                        {
                            @Html.AntiForgeryToken()
                            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                            <div class="form-group">
                                @Html.LabelFor(model => model.UserName, htmlAttributes: new { @class = "control-label col-md-3" })
                                @Html.TextBoxFor(model => model.UserName, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(model => model.UserName, "", new { @class = "text-danger" })
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.Password, htmlAttributes: new { @class = "control-label col-md-3" })

                                @Html.PasswordFor(model => model.Password, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(model => model.Password, "", new { @class = "text-danger" })

                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-3" })

                                @Html.TextBoxFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })

                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.Address, htmlAttributes: new { @class = "control-label col-md-3" })

                                @Html.TextBoxFor(model => model.Address, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(model => model.Address, "", new { @class = "text-danger" })

                            </div>

                                <div class="form-group">
                                    @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-3" })

                                    @Html.TextBoxFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })

                                </div>

                                <div class="form-group">
                                    @Html.LabelFor(model => model.Phone, htmlAttributes: new { @class = "control-label col-md-3" })

                                    @Html.TextBoxFor(model => model.Phone, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.Phone, "", new { @class = "text-danger" })

                                </div>


                                <div class="form-group">
                                    @Html.LabelFor(model => model.Status, htmlAttributes: new { @class = "control-label col-md-3" })

                                    @Html.CheckBoxFor(model => model.Status, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.Status, "", new { @class = "text-danger" })

                                </div>

                                <div class="form-group">
                                    <div class="col-md-offset-2 col-md-10">
                                        <input type="submit" value="Cập nhật" class="btn btn-default" />
                                    </div>
                                </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
